Skip to main content
Version: 3.x.x

UseFetchOptionsType


import { UseFetchOptionsType } from "@hyper-fetch/react"

Description

Defined in react/src/hooks/use-fetch/use-fetch.types.ts:7

Preview

type UseFetchOptionsType<T> = { bounce?: boolean; deepCompare?: boolean | typeof isEqual; dependencies?: any[]; dependencyTracking?: boolean; disabled?: boolean; initialData?: CacheValueType<ExtractResponseType<T>, ExtractErrorType<T>>[data] | null; refresh?: boolean; refreshBlurred?: boolean; refreshOnBlur?: boolean; refreshOnFocus?: boolean; refreshOnReconnect?: boolean; refreshTime?: number; revalidateOnMount?: boolean } & ({ bounceTime?: number; bounceType?: debounce } | { bounceTime?: number; bounceTimeout?: number; bounceType: throttle });

Structure

{
bounce: boolean;
deepCompare: boolean | typeof isEqual;
dependencies: any[];
dependencyTracking: boolean;
disabled: boolean;
initialData: {\n ...params1: ResponseReturnType<Response, Error, AdapterType>;\n ...params2: ResponseDetailsType;\n cacheTime: number;\n clearKey: string;\n garbageCollection: number;\n}[data] | null;
refresh: boolean;
refreshBlurred: boolean;
refreshOnBlur: boolean;
refreshOnFocus: boolean;
refreshOnReconnect: boolean;
refreshTime: number;
revalidateOnMount: boolean;
...params2: {bounceTime:number,bounceType:debounce} | {bounceTime:number,bounceTimeout:number,bounceType:throttle};
}